
#ifndef __QUEUE_H
#define __QUEUE_H

#include "utypes.h"

/** @defgroup Queue Queue
 * @{
 *
 * Queue related functions
 */

/** Queue structure.
 */
typedef struct {
    char buf[10]; ///< Buffer containing values
    int in;       ///< In
    int out;      ///< Out
    int cnt;      ///< Count
    int size;     ///< Size of queue
} Queue;


/** Initiates new queue structure parameters
 */
void queueInit(Queue *q);

/** Put element in queue
 */
Bool queuePut(Queue *q, char c);

/** Returns the last element
 */
int queueGet(Queue *q);

/** Checks if the queue is empty
 */
Bool queueEmpty(Queue *q);

/** Checks if the queue is full
 */
Bool queueFull(Queue *q);

/** @} end of Queue */

#endif /* __QUEUE_H */
